package com.pankaj.lifecycleexample;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
import com.pankaj.lifecycleexample.R;

public class SecondActivity extends Activity{
    /** Called when the activity is first created. */
	String TAG="SecondActivity";
    @Override
    public void onCreate(Bundle savedInstanceState){
    	super.onCreate(savedInstanceState);
    	setContentView(R.layout.layout2);
    	//Toast.makeText(this, "On Create Called In SecondActivity", Toast.LENGTH_LONG).show();
    	Log.i(TAG, "SecondActivity onCreate");
    	 
    }   
    @Override
	protected void onStart() {
		// TODO Auto-generated method stub
		super.onStart();
		Toast.makeText(this, "On Start Called In SecondActivity", Toast.LENGTH_LONG).show();
		Log.i(TAG, "SecondActivity onStart");
	}  
    @Override
	protected void onResume(){
		// TODO Auto-generated method stub
		super.onResume();
		Toast.makeText(this, "On Resume Called In SecondActivity", Toast.LENGTH_LONG).show();
		Log.i(TAG, "SecondActivity onResume");
	}  
 @Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
		Toast.makeText(this, "On Pause Called In SecondActivity", Toast.LENGTH_LONG).show();
		Log.i(TAG, "SecondActivity onPause");
	}
   @Override
	protected void onStop() {
		// TODO Auto-generated method stub
		super.onStop();
		Toast.makeText(this, "On Stop Called In SecondActivity", Toast.LENGTH_LONG).show();
		Log.i(TAG, "SecondActivity onStop");
	}
   @Override
	protected void onDestroy() {
		// TODO Auto-generated method stub
		super.onDestroy();
		Toast.makeText(this, "On Destroy Called In SecondActivity", Toast.LENGTH_LONG).show();
		Log.i(TAG, "SecondActivity onDestroy");	
	}
}